#!/usr/bin/env python
# encoding: utf-8

import pandas as pd
from models.byd import Byd


file = "/Users/carl/Desktop/test/比亚迪1.xlsx"
df = pd.read_excel(file)
df.fillna('', inplace=True)
for index, row in df.iterrows():
    print(row.to_dict())
    byd = Byd()
    byd.code = row.to_dict()['code']
    byd.input_oe = row.to_dict()["OE号"]
    byd.origin_name = row.to_dict()["产品类型"]
    byd.car_names = row.to_dict()["适用车型"]
    byd.save()